<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<title>发布全国展览</title>
<link href="../style/css_member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/common.js"></script>
<script src="../js/artDialog.js?skin=gray"></script>
<script src="../js/artDialog.iframeTools.js"></script>
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script language="javascript" type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>

<script type="text/javascript">

$(function(){
	$("#exhibitionLink").click(function(){
		art.dialog.open('${ctx}/fileUpload!uploadPrepare.do?imgType=exhibition&sharpId=7',{title:'上传展览海报图片',width:800,height:550,lock:true},false);
    });

	$("a[name='addPaintingHref']").click(function(){
		//art.dialog.open('${ctx }/painting/addPrepare.do',{title:'添加作品',width:820,height:550,lock:true},false);
		alert("请先保存展览资料");
		return false;
    });

	m1('m1_014');
});

	function checkForm(){

		var title = $.trim($("#title").val());
		if( title  ==  ""){
			$("#title").focus();
			 alert("请填写展览主题。");
			 return false;
		}

		var picImage = $("#picImage").val();
		if( picImage == "" ){
			alert("请上传展览海报图片");
			return false;
		}

		var province = $("#provinceInfoSelect").val();
		if( province == ""){
			 alert("请选择展览所在省。");
			 return false;
		}

		var city = $("#cityInfoSelect").val();
		if( city == ""){
			 alert("请选择展览所在市。");
			 return false;
		}

		var beginTime = $.trim($("#beginTime").val());
		if( beginTime  ==  ""){
			 alert("请填写展览开始时间。");
			 return false;
		}

		var endTime = $.trim($("#endTime").val());
		if( endTime  ==  ""){
			 alert("请填写展览结束时间。");
			 return false;
		}

		var publisher = $.trim($("#publisher").val());
		if( publisher  ==  ""){
			$("#publisher").focus();
			 alert("请填写主办单位。");
			 return false;
		}

		var description = $.trim($("#description").val());
		if( description  ==  ""){
			$("#description").focus();
			 alert("请填写序言。");
			 return false;
		}

		if(window.confirm("确认提交？")){
			$("#exhibitionForm").submit();
		}
	}
	
</script>
<style type="text/css">
.style19 {color: #666666}
</style>
</head>

<body>

<!-- 页面头部  -->
<jsp:include page="/commons/head_member.jsp"></jsp:include>

<form action="${ctx }/exhibition/save.do" method="post" id="exhibitionForm" name="exhibitionForm" enctype="multipart/form-data">
<table width="960" border="0" cellspacing="0" cellpadding="0" align="center" class="tbl_border_top" bgcolor="#ffffff">
          <tr>
          	<td>&nbsp;</td>
            <td align="center" class="bt14A">填写展览资料</td>
          </tr>
          <tr>
            <td class="bt14A" align="right"><span class="style15">*</span> 展览主题：</td>
            <td class="bt14A"><input name="exhibition.title" type="text" size="40" id="title"></td>
            <td width="198" rowspan="8" valign="top" class="bt14A" align="left">
                  <table width="165" height="220" border="0" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC" bgcolor="#CCCCCC">
                    <tr>
                      <td bgcolor="#FFFFFF">
                      		<div id="photoTd" style="width: 165px;height: 220px;vertical-align: middle;text-align: center;overflow: hidden;"></div>
                      </td>
                    </tr>
                  </table>
            </td>
          </tr>
          <tr>
            <td class="bt14A" align="right">上传展览海报：</td>
            <td class="bt14A style18"><a id="exhibitionLink" style="cursor: pointer;color: red">上传</a></td>
          </tr>
          <tr>
            <td  class="bt14A" align="right"><span class="style15">*</span> 展览城市：</td>
            <td class="bt14A">
	             <select name="exhibition.provinceInfo.id" id="provinceInfoSelect" onchange="changeProvince()">
                        <option value="">选择省份</option>
                        <c:forEach items="${provinceInfoList}" var="provinceInfo" varStatus="status">
				            <option value="${ provinceInfo.id}"/> ${ provinceInfo.name}</option>
				        </c:forEach>
                </select>
                <select name="exhibition.cityInfo.id" id="cityInfoSelect">
                  <option value="">选择县市</option>
                </select>
            </td>
          </tr>
          <tr>
            <td class="bt14A" align="right"><span class="style15">*</span> 展览地点：</td>
            <td class="bt14A"><input name="exhibition.address"  type="text" size="30" id="address" maxlength="200"></td>
          </tr>
          <tr>
            <td class="bt14A" align="right"><span class="style15">*</span> 展览时间：</td>
            <td class="bt14A">
                <input name="exhibition.beginTime" type="text" size="15" id="beginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">开始至
                <input name="exhibition.endTime" type="text" size="15" id="endTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">结束
            </td>
          </tr>
          <tr>
            <td class="bt14A" align="right"><span class="style15">*</span> 主办单位：</td>
            <td class="bt14A"><input name="exhibition.publisher" type="text" size="30" id="publisher"></td>
          </tr>
          <tr>
            <td class="bt14A" align="right">参展人员：</td>
            <td class="bt14A"><input name="exhibition.artists" type="text" size="50"  id="artists" maxlength="100"><span class="style19">多人请用，号分隔</span>
            </td>
          </tr>
          <tr>
            <td class="bt14A" align="right"><span class="style15">*</span> 展览前言：</td>
            <td class="bt14A"><textarea name="exhibition.description" cols="64" rows="5" id="description"></textarea>
                <!-- 隐藏域 begin -->
	            	<input name="exhibition.imageInfo.id" type="hidden"  id="picImage">
	            	<input name="exhibition.type" type="hidden"  id="exhibition_type" value="2">
	            	<input name="exhibition.unit" type="hidden"  id="exhibition_unit" value="幅">
	            <!-- 隐藏域 end -->
            </td>
          </tr>
          <tr>
            <td width="148">&nbsp;</td>
            <td class="nw12a"><img src="../images/an24.gif" width="114" height="31" onclick="javascript:checkForm();"  style="cursor: pointer ;border: 0;"></td>
          </tr>
</table>
</form>

<%@ include file="/member/list_painting_fragment.jsp" %>

<jsp:include page="/commons/foot_member.jsp"></jsp:include>

</body>
</html>